import "./index.css";
import { h, defineComponent, type PropType } from "vue";

const props = {
  render: {
    type: Function as PropType<CommonTable.TableCloumnRenderType>,
    require: true
  }
};

export default defineComponent({
  name: "ReTableCloumn",
  props,
  setup(props, { slots, attrs }) {
    const style = { height: "var(--px-table__cell-div-height)" };
    const prop = { ...attrs, style };
    return () =>
      h("div", prop, {
        default: () => slots?.default?.() ?? "--"
      });
  }
});
